package com.idc.quotation.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.idc.quotation.entity.SystemVerModel;
import com.idc.quotation.vo.SysModelVo;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QuotationSystemVerModelMapper extends BaseMapper<SystemVerModel> {
    @Select("select sys.id as sysid,sys.system_name as sysName,ver.id as versionId,ver.version as versionName,mo.id as modelId,mo.model_name modelName,mo.model_desc as modelDesc,mo.model_config as modelConfig,mo.model_unit as modelUnit,mo.model_price as modelPrice from t_ykx_quotation_system sys inner join t_ykx_quotation_system_version ver on ver.system_id =sys.id inner join t_ykx_quotation_sys_ver_model mo on mo.version_id = ver.id where sys.id = #{sysId};")
    List<SysModelVo> queryModelBySysId(@Param("sysId") Integer sysId);
}
